<template>
    <div class="showConceptList">
      <ul class="conceptImg" :style="'background:url('+info.img_src+');background-size:cover;background-position:center;background-repeat:no-repeat;'">
        <!--<img :src="info.img_src" :width="imgWidth">-->
      </ul>
      <div class="content" :style="'width:'+imgWidth+'px;height:'+imgWidth+'px;margin-top:-'+imgWidth+'px'">
        <ul>
          <li class="keyword">{{(this.lang==='cn')?info.keyword:info.keyword_en}}</li>
          <li class="line" :style="'width:'+(imgWidth/12)+'px'"></li>
          <li class="title">{{(this.lang==='cn')?info.title:info.title_en}}</li>
          <li class="desc">{{(this.lang==='cn')?info.desc:info.desc_en}}</li>
        </ul>
      </div>
    </div>
</template>

<script>
    export default {
        name: "showConceptList",
      computed:{
        lang:{
          get(){
            let storageData = window.sessionStorage.getItem('lang');
            if(this.$store.state.lang!==storageData&&storageData!=='null'){
              this.$store.dispatch('toChangeLang', storageData);    //同步操作
            }
            return this.$store.getters.getLang;
          },
          set(){}
        },
      },
      methods:{
        getImgWidth(){
          this.imgWidth=document.body.clientWidth;
        }
      },
      data(){
          return{
            imgWidth:0,
          }
      },
        props:{
          info:{},
        },
      created(){
          this.getImgWidth()
      }
    }
</script>

<style scoped>
  .showConceptList{
    position: relative;
    border-top:1px solid #FFF;
  }
  .conceptImg{
    width:100%;
    height:100vw;
    font-size: 0;
  }
  .productImg img{
    width:100%;
    display: block;
  }
  .content{
    position:absolute;
    color:#FFF;
    display: flex;
    align-items: center;
  }
  .content ul{
    width:100%;
  }
  .content .keyword{
    font-size:30px;
  }
  .content .line{
    background: #FFF;
    height: 1px;
    border-top: solid #ACC0D8 1px;
    display: inline-block;
    margin-top: 30px;
    margin-bottom:20px;
  }
  .content .title,.desc{
    font-size: 13px;
    color:#999999;
    padding-bottom: 10px;
  }
</style>
